﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using PMSGSC.DAL;
using PMSGSC.BLL;

namespace PMSGSC.App
{
    public partial class frmCloseJob : DevExpress.XtraEditors.XtraForm
    {
        public frmCloseJob(frmMain main)
        {
            InitializeComponent();
            objMain = main;
        }
        frmMain objMain;
        WorkOrder workOrder;
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (ucLoadWorkOrder1.lbid.Text != "")
            {
                workOrder = WorkOrder_BLL.GetDataById(int.Parse(ucLoadWorkOrder1.lbid.Text));
                frmCloseJobDetail closeJobDetail = new frmCloseJobDetail(workOrder);
                closeJobDetail.MdiParent = objMain;
                closeJobDetail.Show();

                this.Close();
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}